import api from "../../api"

// 员工列表
const staffList = function (params) {
  return api.postRequest(api.requestURL + 'travel/staff/staffList', params, false, {'Content-Type': 'application/json'})
}

// 员工登录
const staffLogin = function (params) {
  return api.postRequest(api.requestURL + 'travel/staff/login', params)
}

// 修改员工信息
const updateStaff = function (params) {
  return api.postRequest(api.requestURL + 'travel/staff/updateStaff', params, false, {'Content-Type': 'application/json'})
}

// 新增员工
const addStaff = function (params) {
  return api.postRequest(api.requestURL + 'travel/staff/addStaff', params, false, {'Content-Type': 'application/json'})
}

// 退出登录
const logout = function () {
  return api.getRequest(api.requestURL + 'travel/staff/loginOut')
}

export default {
  staffList,
  updateStaff,
  addStaff,
  staffLogin,
  logout
}
